package com.zmzncs.lmtc.module.shop.pojo.shop_order;

import com.zmzncs.lmtc.common.util.ExceptionUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @Author 高博文
 * @Date 2021/06/16 15:18
 */
@Data
public class OrderPaymentSelectForm {

    @ApiModelProperty(value = "业务类型")
    @NotNull
    private String businessType;

    @ApiModelProperty(value = "停车场ID")
    private Long parkId;

    @ApiModelProperty(value = "商户Id")
    private Long shopId;

    public void validate(){
        if ("商户".equals(businessType) && shopId == null){
            ExceptionUtil.paramException("商户ID不能为空");
        }
    }
}
